﻿using Clipper.ClipperWindow;
using Global;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Clipper.ClipperUserControl
{
    /// <summary>
    /// UserDisplay.xaml 的交互逻辑
    /// </summary>
    public partial class UserDisplay : UserControl
    {
       

        public UserDisplay()
        {
            InitializeComponent();

            DataBind();
        }

        public  void DataBind()
        {            
            this.DataContext = Global.ServiceProvider.Monitor;
        }

        private void cancancle_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //display.SelectedItem;
            if (((Model.DataBaseModel.DisplayCup)display.SelectedItem).CupStatus == "空" ||
                       ((Model.DataBaseModel.DisplayCup)display.SelectedItem).CupStatus == "取消" ||
                       ((Model.DataBaseModel.DisplayCup)display.SelectedItem).CupStatus == "完成")

            {

            }
            else
            {
                WinDetectCancel win = new WinDetectCancel();
                win.Tag = display.SelectedItem;
                win.ShowDialog();
            }
        }
    }
}
